﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;

namespace Coater.Domain
{
    public class DeviceInfo
    {
        /// <summary>
        /// 数据库Id
        /// </summary>
        public long Id { get; set; } = -1;
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 设备类型 
        /// </summary>
        public string DeviceType { get; init; } = string.Empty;
        /// <summary>
        /// 设备描述
        /// </summary>
        public string? Desc { get; set; } = string.Empty;
        /// <summary>
        /// 设备是否启用
        /// </summary>
        public bool Enable { get; set; } = true;
        /// <summary>
        /// 设备自身的IP地址
        /// </summary>
        public string ConnectIp { get; set; } = string.Empty;
        /// <summary>
        /// 设备自身的端口号
        /// </summary>
        public int ConnectPort { get; set; }
        /// <summary>
        /// 串口号
        /// </summary>
        public string SerialPortName { get; set; } = string.Empty;
        /// <summary>
        /// 波特率
        /// </summary>
        public int BaudRate { get; set; } = 9600;
        /// <summary>
        /// 实现IDevice下子接口的，对应类的Fullname
        /// </summary>
        public string ObjectType { get; init; } = string.Empty;

    }
}
